package com.cyk.util;

import com.cyk.config.EmailConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Random;

@Component
public class ToolUtil {

    @Autowired
    private EmailConfig emailConfig;

    private static final ToolUtil instance = new ToolUtil();

    private ToolUtil() {
        super();
    }

    public static ToolUtil getInstance() {
        return instance;
    }

    public int getCode() {
        return new Random().nextInt(999999);
    }

    public boolean sendEmail(String email, String body) {
        return true;
    }
}
